using System;
using System.Collections.Generic; 
using System.Linq;  
using System.Text;  
using System.Data.Linq.Mapping;
using System.Data.Linq;
using System.ComponentModel;

namespace MRSite.Entity  
{  
    /// <summary>
    /// 店铺交易日志表
    /// </summary>
     [Table(Name = "shop_amountlog")]
    public class ShopAmountlog : Entity
    { 
		/// <summary>
		///
		/// </summary>
		[Column(Name = "id", IsPrimaryKey = true, CanBeNull = false, IsVersion = true)]
		public override int id{ get; set; } 

		/// <summary>
		///
		/// </summary>
        [Column(Name = "user_id")]
        public int user_id { get; set; } 

		/// <summary>
		///
		/// </summary>
        [Column(Name = "user_name")]
        public String user_name { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        [Column(Name = "title")]
        public String title { get; set; } 

		/// <summary>
		/// 金额
		/// </summary>
		[Column(Name = "val")]
		public Decimal val{ get; set; } 

         	/// <summary>
		/// 余额
		/// </summary>
        [Column(Name = "balance")]
        public Decimal balance { get; set; } 
         

		/// <summary>
		///
		/// </summary>
		[Column(Name = "remark")]
		public String remark{ get; set; } 

		/// <summary>
		///
		/// </summary>
		[Column(Name = "addtime",IsDbGenerated=true)]
		public DateTime addtime{ get; set; } 

		/// <summary>
		///提现，充值，购物消费，量碰，层碰，见定，其他
		/// </summary>
		[Column(Name = "tradetype")]
		public String tradetype{ get; set; } 

		/// <summary>
		///币种:XJB现金币,CFXFB重复消费币,GWB购物币
		/// </summary>
		[Column(Name = "feetype")]
		public String feetype{ get; set; }

         	/// <summary>
		///
		/// </summary>
        [Column(Name = "levels")]
        public int levels { get; set; } 
         

        /// <summary>
        /// 基于给奖励的用户id
        /// </summary>
        [Column(Name = "jiandian_userid"), DefaultValue(0)]
        public int jiandian_userid { get; set; }

        /// <summary>
        /// 店铺id
        /// </summary>
        [Column(Name = "shopid"), DefaultValue(0)]
        public int shopid { get; set; }


        private EntityRef<Customer> _member;

        /// <summary>
        /// 
        /// </summary>
        [Association(Storage = "_member", ThisKey = "user_id", OtherKey = "id")]
        public Customer CustomerItem
        {
            get { return this._member.Entity; }
            set { this._member.Entity = value; }
        }
	 } 
}    

